//
//  AnalysisHelper.m
//  pocketmedicine
//
//  Created by student on 16/4/25.
//  Copyright © 2016年 NIIT. All rights reserved.
//

#import "AnalysisHelper.h"

@implementation AnalysisHelper

+ (NSDictionary *)analysisInfo:(NSString *)str
{
    //处理数据去掉\n <p>
    str = [str stringByReplacingOccurrencesOfString:@"<p>" withString:@""];
    str = [str stringByReplacingOccurrencesOfString:@"</p>" withString:@""];

//    str = [str stringByReplacingOccurrencesOfString:@"\n" withString:@""];
    str = [str stringByReplacingOccurrencesOfString:@"&nbsp;" withString:@""];
    
    NSData *d = [str dataUsingEncoding:NSUTF8StringEncoding];
    NSDictionary *dict = [NSJSONSerialization JSONObjectWithData:d  options:NSJSONReadingMutableLeaves error:nil];
    return dict;


//    return dict;
}

@end
